import request from '@/utils/request'
export const reqGetDepartments = () => {
  return request({
    url: '/company/department',
    method: 'GET'
  })
}
// 删除部门
export const reqDelDepartments = (id) => {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 新增部门接口
export function reqAddDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取部门详情
export const reqGetDepartDetail = (id) => {
  return request({
    method: 'get',
    url: `/company/department/${id}`
  })
}
// 根据id修改部门
export function reqEditDepart(data) {
  return request({
    method: 'PUT',
    url: `/company/department/${data.id}`,
    data
  })
}
